Function: focus(domElementOrCSSSelector, functionCallback(domElement) ) Description: Forces progrommatic focus to any rendered element within the body. Returns: domElement, or $A object if chained. Note: This method moves programmatic focus, and does not explicitly set or trigger any attached focus handlers, though any onFocus handlers will be triggered if attached. The optional callback function can be used to perform additional actions after focus is moved. When a CSS selector is passed as the first parameter, focus will be set to the first element that matches the query. Example: // Move focus to a DOM element $A.focus(domElement); // Move focus to a DOM element using a CSS selector $A.focus("h1"); // Move focus to a DOM element using a CSS selector then execute a callback $A.focus("h1", function(domElement) { // Do something with domElement }); // Or the same using chaining // Move focus to the first heading element on the page var myChain = $A("h1").focus(); // Move focus to the first heading element on the page then execute a callback var myChain = $A("h1").focus(function(domElement) { // Do something with domElement }); // To return the modified object within a chain, use the "return()" method. var domElement = myChain.return();